﻿using FixMath.NET;
using TEngine;

namespace GameLogic
{
    [Update]
    public class SystemModule : BehaviourSingleton<SystemModule>
    {
        public Fix64 TimeDelta = 1.0m / 60;

        static public int LogicFrame = 30;
        public Fix64 LogicDelta { get { return m_LogicDelta; } }
        public Fix64 m_LogicDelta = 1.0m / LogicFrame;
        public void Init()
        {
            //Application.targetFrameRate = 60;
            //UnityEngine.Debug.unityLogger.logEnabled = false;
        }
        public override void Update()
        {
            //var timeDelta = TimeDelta.ToFloat();
            //if (Time.deltaTime < timeDelta)
            //    Thread.Sleep((int)((timeDelta - Time.deltaTime) * 1000));

        }
    }
}
